package com.example.springtest.people.mapper;

import com.example.springtest.people.pojo.entity.People;
import com.example.springtest.people.pojo.vo.AvatarVO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 持久层
 */


@Repository
@Mapper
public interface PeopleMapper {
    /**
     * 新增学生
     * @param people
     * @return
     */
    int savePeople(People people);

    /**
     * 获取学生
     * @return
     */
    List<People> getList();

    /**
     * 获取人员信息
     * @param stu_id
     * @return
     */
    People getPeople(Integer stu_id);

    /**
     * 删除学生
     * @param stu_id
     */
    void delete(Integer stu_id);
//判断是否存在该学生
    People getByName(String name);

    //编辑学生
    int updatePeople(People people);

    int updateAvatar(People people);

    List<AvatarVO> getAvatarList();
}
